package com.vdg.lockphotos.view;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.FrameLayout;
import android.widget.ImageView;

import com.vdg.lockphotos.R;

public class PhotoLoadingView extends FrameLayout {
	public ImageView mImvPhoto;
	Animation myFadeInAnimation;
	public ImageView mImvDefaultPhoto;

	public PhotoLoadingView(Context context) {
		super(context);
		LayoutInflater li = (LayoutInflater) this.getContext()
				.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		li.inflate(R.layout.image_cell, this, true);
		myFadeInAnimation = AnimationUtils.loadAnimation(getContext(),
				R.anim.tween);
		mImvPhoto = (ImageView) findViewById(R.id.imv_photo);
		mImvDefaultPhoto = (ImageView) findViewById(R.id.imv_loading);
		// TODO Auto-generated constructor stub
	}


	public void showSelected() {
		mImvDefaultPhoto.setVisibility(View.VISIBLE);
	}

	public void hideSelected() {
		mImvDefaultPhoto.setVisibility(View.GONE);
	}
}
